import { createStore } from 'vuex'
import createPersistedState from 'vuex-persistedstate' // 引入vuex持久化插件
import cart from './modules/cart'
import category from './modules/category'
import user from './modules/user'
export default createStore({
  state: {
  },
  getters: {
  },
  mutations: {
  },
  actions: {
  },
  modules: {
    cart,
    category,
    user
  },
  plugins: [createPersistedState({
    key: 'erabbit-client-pc-store', // 自定义本地存储名称
    paths: ['user', 'cart'] // 自定义模块持久化
  })] // vuex持久化插件
})
